/**
 * 7个页面的路由
 */

import * as VueRouter from 'vue-router'

const routes = [
  {
    path: '/mobile',
    component: () => import('./pages/ViewPage.vue'),
    children: [
      {
        path: 'home',
        component: () => import('./pages/home/HomeView.vue'),
      },
      {
        path: 'user-center',
        component: () => import('./pages/Account/UserCenter.vue'),
      },
      {
        path: 'theory-and-technology',
        component: () =>
          import('./pages/TheoryAndTechnology/TheoryAndTechnology.vue'),
      },
      {
        name: '我的送检',
        path: 'my-order',
        component: () => import('./pages/Report/MyOrder.vue'),
      },
      {
        name: '我的预约',
        path: 'my-submission',
        component: () => import('./pages/Report/MySubmission.vue'),
      },
      {
        name: '个人信息',
        path: 'my-report',
        component: () => import('./pages/Report/MyReport.vue'),
      },
      {
        // name: '送样登记',
        path: 'sample-register',
        component: () => import('./pages/SampleRegister/SampleRegister.vue'),
      },
      {
        name: '仪器预约',
        path: 'equ-time-booking',
        component: () => import('./pages/EquTimeBooking/EquTimeBooking.vue'),
      },
      {
        // name: '送样单位',
        path: 'my-report-company',
        component: () => import('./pages/Report/MyReportListCompany.vue'),
      },
      {
        // name: '送样单位',
        path: 'my-report-list',
        component: () => import('./pages/Report/MyReportList.vue'),
      },
      {
        // name: '送样单位',
        path: 'my-report-result',
        component: () => import('./pages/Report/MyReportResult.vue'),
      },
      {
        // name: '报告验伪',
        path: 'my-report-detail',
        component: () => import('./pages/Report/MyReportDetail.vue'),
      },
      {
        // name: '仪器预约',
        path: 'device-list',
        component: () => import('./pages/Device/DeviceList.vue'),
      },
      {
        path: 'device-detail',
        component: () => import('./pages/Device/DeviceDetail.vue'),
      },
      {
        // name: '设备信息',
        path: 'device-info',
        component: () => import('./pages/Device/DeviceInfo.vue'),
      },
      {
        path: 'device-project',
        component: () => import('./pages/Device/ProjectList.vue'),
      },
      {
        path: 'about',
        component: () => import('./pages/About/AboutUs.vue'),
      },
      {
        path: 'login',
        component: () => import('./pages/Account/AccountLogin.vue'),
      },
    ],
  },
  {
    path: '/',
    redirect: '/mobile/home',
  },
]

const router = VueRouter.createRouter({
  history: VueRouter.createWebHistory(),
  routes,
})

export default router
